package com.hbk.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo")
public class DemoController {

    @Value("${app.home}")
    private String appHome;

    @RequestMapping("/test01")
    public String test01(){

        String result = "ok";
        if(StringUtils.isNotEmpty(appHome)){
            result = appHome;
        }
        return result;
    }
}
